<!--<?php
if($subaction == 'edit' && empty($step) && defined('AJAX')){
print <<<EOT
-->
<div class="popoutContent">
   	<h2 class="h1"><a class="del_img fr" href="javascript:;" onclick="closep();">关闭</a>
<!--
EOT;
if($id){
print <<<EOT
-->
	编辑不同物业价格记录
<!--
EOT;
}else{print <<<EOT
-->
	添加不同物业价格记录
<!--
EOT;
}print <<<EOT
-->
   	</h2>
  	<div style="height: 273px; overflow-y: auto;">
		<form action="$baseurl&subaction=edit&verify=$posthash" method="post" onsubmit="return false;">
		<input type="hidden" value="2" name="step">
		<input type="hidden" value="$id" name="id"/>
		<input type="hidden" value="$hid" name="hid">
      	<div class="admin_table mb10">
          <table cellspacing="0" cellpadding="0" width="100%">
              <tbody>
              <tr class="tr1 vt">
              	<td class="td1">标题</td>
              	<td class="td2" colspan="3"><input type="text" class="input input_wa mr5" name="title" value="$price[title]"/></td>
              </tr>
              <tr class="tr1 vt">
              	<td class="td1">物业类型</td>
              	<td class="td2"><select name="property">
<!--
EOT;
foreach($propertyField as $key => $value){
$_selected = $key == $price['propertyid'] ? 'selected' : '';
print <<<EOT
-->
						<option value="$key" $_selected>$value</option>
<!--
EOT;
}print <<<EOT
--> 						
 					</select></td>
              	<td class="td1">建筑类别</td>
              	<td class="td2"><select name="buildtype">
<!--
EOT;
foreach($buildtypeField as $key => $value){
$_selected = $key == $price['buildtypeid'] ? 'selected' : '';
print <<<EOT
-->
						<option value="$key" $_selected>$value</option>
<!--
EOT;
}print <<<EOT
--> 						
 					</select></td>
              </tr>
              <tr class="tr1 vt">
              	<td class="td1">当前价格</td>
              	<td class="td2"><input type="text" class="input input_wc mr20" name="currentprice" value="$price[currentprice]"/></td>
              	<td class="td1">交付标准</td>
              	<td class="td2"><select name="paystatus">
<!--
EOT;
foreach($fitmentField as $key => $value){
$_selected = $key == $price['paystatusid'] ? 'selected' : '';
print <<<EOT
-->
						<option value="$key" $_selected>$value</option>
<!--
EOT;
}print <<<EOT
--> 						
 					</select></td>
              </tr>
              <tr class="tr1 vt">
              	<td class="td1">本期户数</td>
              	<td class="td2"><input type="text" class="input input_wc mr20" name="hnum" value="$price[hnum]"/></td>
              	<td class="td1">开盘时间</td>
              	<td class="td2"><input id="opentime" type="text" class="input input_wc mr20" name="opentime" value="$price[opentime]" onclick="ShowCalendar(this.id)"/></td>
              </tr>
              <tr class="tr1 vt">
              	<td class="td1">交付时间</td>
              	<td class="td2" colspan="3"><input id="paytime" type="text" class="input input_wc mr20" value="$price[paytime]" name="paytime" onclick="ShowCalendar(this.id)"/></td>
              </tr>
          </tbody></table>
        </div>
		<div class="mb10 tac">
			<span class="btn"><span><button type="button" onfocus="blur();" onclick="ajax.submit(this.form)">提 交</button></span></span>
		</div>
	</form>
    </div>
</div>
<!--
EOT;
}else{print <<<EOT
-->
<script language="JavaScript" src="js/global.js"></script>
<script language="JavaScript" src="js/pw_ajax.js"></script>
<script language="JavaScript" src="js/date.js"></script>
<h2 class="h1"><span class="fl mr10">价格明细维护</span><a id="pricedetail" class="btn_add fl" href="javascript:;" onclick="sendmsg('$baseurl&subaction=edit','',this.id)"><i>添加</i></a></h2>
<form method="post" action="$baseurl&subaction=del" name="FORM">
<div class="admin_table mb10">
	<table cellspacing="0" cellpadding="0" width="100%">
   		<tbody><tr class="tr2">
        	<td width="40" class="tac"><span onclick="CheckAll(document.FORM)" class="cp">选择</span></td>
            <td>标题</td>
            <td>物业类型</td>
            <td>建筑类型</td>
            <td>均价</td>
            <td>开盘时间</td>
            <td>交付时间</td>
            <td>操作</td>
        </tr>
<!--
EOT;
foreach($pricedetails['contents'] as $key => $value){
$_property = $house_field[property][$value[propertyid]]['name'];
$_buildtpe = $house_field[buildtype][$value[buildtypeid]]['name'];
print <<<EOT
-->
        <tr class="tr1 vt">
        	<td class="td2"><input type="checkbox" value="$value[id]" name="ids[]"/></td>
            <td class="td2">$value[title]</td>
            <td class="td2">$_property</td>
            <td class="td2">$_buildtpe</td>
            <td class="td2">$value[currentprice]</td>
            <td class="td2">$value[opentime]</td>
            <td class="td2">$value[paytime]</td>
            <td class="td2"><a class="mr20" href="javascript:;" onclick="sendmsg('$baseurl&subaction=edit&id=$value[id]','',this.id)">[编辑]</a>
            				<a class="mr20" href="$baseurl&subaction=del&hid=$hid&ids=$value[id]" onclick="return confirm('确认删除该数据？')">[删除]</a></td>
        </tr>
<!--
EOT;
}print <<<EOT
-->
    </tbody></table>
</div>
<div class="mb10 cc">
$pricedetails[pages]
</div>
<div class="mb10 tac">
	<span class="bt"><span><button type="button" onclick="CheckAll(this.form)" onfocus="blur();">全 选</button></span></span>
	<span class="btn"><span><button onclick="return confirm('确认删除已选择的价格明细？');" type="submit" onfocus="blur();">删 除</button></span></span>
</div>
</form>
<!--
EOT;
}?>
